package com.krt.webapp.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.KeyEvent;
import android.widget.LinearLayout;

import com.krt.webapp.R;

public class WelcomeActivity extends Activity{
	Handler handler = new Handler();
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO 自动生成的方法存根
		super.onCreate(savedInstanceState);
		LinearLayout linearLayout = new LinearLayout(this);
		linearLayout.setBackgroundResource(R.mipmap.zhjywelcome);
		setContentView(linearLayout);
		
		handler.postDelayed(new Runnable() {  
        	
            public void run() {  
//                Intent intent = new Intent(WelcomeActivity.this, WebActivity.class);
//                startActivity(intent);
                finish();     
            }  
        }, 2000);//3秒后跳转  
	}
	
	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		// TODO 自动生成的方法存根
		if (keyCode == KeyEvent.KEYCODE_BACK) {
				return true;
		}else {
			return super.onKeyDown(keyCode, event);
		}
	}

}
